﻿using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace EnterpriseLibraryExtensions.Events.Aggregation
{
    /// <summary>
    /// The ScopeOptions interface defines a simple method that filters a list of enlisted event handlers according to the rules
    /// implemented in the class exposing this interface. For rules about filtering, examine the specific implementations.
    /// </summary>
    public interface IScopeOptions
    {
        /// <summary>
        /// Filters the provided enlistedEventHandlers and returns a filtered read-only collection.
        /// </summary>
        /// <param name="enlistedEventHandlers">The enlistedEventHandlers that needs to be filtered.</param>
        /// <returns>A ReadOnlyCollection of enlisted event handlers. List is guaranteed to never be null.</returns>
        ReadOnlyCollection<IEnlistedEventHandler> RemoveDuplicates(IEnumerable<IEnlistedEventHandler> enlistedEventHandlers);
    }
}
